<template>
	<view>
		<!-- nav -->
		<view class="nav">
			<view class="flex_between">
				<view class="nav_title" v-for="item in nav">
					<view :class="{'active':isActive==item.isActive}" @click="chenked(item.isActive)">
						{{item.name}}
					</view>
				</view>
			</view>
		</view>
		
		<!-- nav-item -->
		<!--商品-->
		<view class="nav_item" v-if="isActive==1">
			<image class="descImg" :src="pinKDesc.goods_img"></image>
				<view>
					<!-- 拼团价 -->
					<span style="font-size: 50rpx;color: #FF0000;">￥<b><i>{{pinKDesc.pink_price}}</i></b></span>
					<!-- 市场价 -->
					<span style="font-size: 20rpx;color: #AAAAAA;text-decoration:line-through"><i>{{pinKDesc.price}}</i></span>
				</view>
				<view class="">
					<!-- 拼团商品名称 -->
					{{pinKDesc.pink_name}}
				</view>
				<view style="display: flex;justify-content: space-between;border-bottom: 5rpx solid #AAAAAA;">
					<span style="">类型：{{pinKDesc.pink_people}}人团</span>
					<span style="">累积销量：{{pinKDesc.total_num}}</span>
					<span style="">限购：{{pinKDesc.quota_show}}</span>
				</view>
				<view style="border-bottom: 5rpx solid #AAAAAA;">
					拼团玩法
					<view style="display: flex;justify-content: space-around;">
						<span>开团/参团</span>
						<span>-></span>
						<span>邀请好友</span>
						<span>-></span>
						<span>满员发货</span>
					</view>
				</view>
				<view style="border-bottom: 5rpx solid #AAAAAA;">
					用户评价（{{commont}}）
				</view>
				<view>
					产品介绍
				</view>
				<view class='footer' style="display: flex;">
					<navigator  class="iconfont" url="/pages/index/index">
						<view style="font-size: 40rpx;">&#xe600;</view>
						<view style="font-size: 40rpx;mg">首页</view>
					</navigator>
					<view @tap='' class="iconfont">
						<view style="font-size: 40rpx;">&#xe60b;</view>
						<view style="font-size: 40rpx;">收藏</view>
					</view>
					<view class="bnt" style="display: flex;">
						<view class="joinCart bnts" @tap="goPay(pinKDesc.goods_sku_id)">单独购买</view>
						<!-- v-if='attribute.productSelect.product_stock>0&&attribute.productSelect.quota>0' -->
						<!-- @tap="goPink(pinKDesc.goods_sku_id)" -->
						<view class="buy bnts"   @click="$refs['GoodsAttr'].show(3)">
							立即开团
						</view>
					</view>
				</view>
						
		</view>
<!-- 		<view class="nav_item" v-if="isActive==2">
			222
		</view>
		<view class="nav_item" v-if="isActive==3">
			333
		</view> -->
	</view>
	
</template>

<script>
	export default {
		data() {
			return {
				//导航栏
				nav:[
					{name:'商品',isActive:1},
					{name:'评价',isActive:2},
					{name:'详情',isActive:3},
				],
				isActive: 1,
				//详情
				pinKDesc:[],
				//评论统计
				commont:0,
			};
		},
		onShow() {

		},
		onLoad(params) {
			//调用查询详情方法
			// this.pinkDesc(params.pinkId);
			this.pinkDesc(10);
		},
		methods: {
			//切换nav
			chenked(type) {
				this.isActive = type
			},
		},
	}
</script>

<style lang="scss">
	@import  '/common/icon-font.css';
</style>
